// pages/mark_2/mark_2.js
var app = getApp();
Page({

  data: {
    isPoint: false,
    item: [],
    sum: 0,
    Listsum: 0,
    modalHidden: true,
    isHave:false
  },

  OnMark_FinishTap: function (event) {
    if (app.globalData.address == "pass_1") {
      wx.navigateTo({
        url: '/pages/pass_1/pass_1',
      })
    }
    if (app.globalData.address == "pass_2") {
      wx.navigateTo({
        url: '/pages/pass_2/pass_2',
      })
    }
    if (app.globalData.address == "out_2") {
      wx.navigateTo({
        url: '/pages/out_2/out_2',
      })
    }
  },
  
  onLoad: function (options) {
    wx.setNavigationBarTitle({
      title: '详细信息'
    })
     var postId = options.id
     this.setData({
      item: app.globalData.pass[postId],
      avatar : app.globalData.pass[postId].avatar
    })
    if(this.data.avatar != null){
      this.setData({
        isHave : true
      })
    }
    if(this.data.item.isPass1 == 1){
      this.setData({
        reason : this.data.item.reason1
      })
    }else {
      this.setData({
        reason : this.data.item.reason2
      })
    }
  },
    //展开详细信息
    Oninformation_reason:function(e){
      this.setData({
        modalHidden: false
      })
    },
     /**
     * 点击取消
     */
    modalCandel: function () {
      // do something
      this.setData({
        modalHidden: true
      })
    },
  
    /**
     *  点击确认
     */
    modalConfirm: function () {
      // do something
      this.setData({
        modalHidden: true
      })
    },

})